#ifndef A95AB131_ECF3_48D9_BB7B_E28E6FBAA8BE
#define A95AB131_ECF3_48D9_BB7B_E28E6FBAA8BE
#ifndef E57C2675_F3E4_44D5_8832_5C5785E8F9FC
#define E57C2675_F3E4_44D5_8832_5C5785E8F9FC

#include <iostream>
#include <unistd.h>
#include <fcntl.h>
using namespace std;

void SetNonBlockOrDie(int sockfd)
{
    int fl = fcntl(sockfd, F_GETFL);
    if (fl < 0)
        exit(1);
    fcntl(sockfd, F_SETFL, fl | O_NONBLOCK);
}

#endif /* E57C2675_F3E4_44D5_8832_5C5785E8F9FC */


#endif /* A95AB131_ECF3_48D9_BB7B_E28E6FBAA8BE */
